from django.db import models


# 请假单表
# class Leave(models.Model):
#     type = (
#         (1, '待批准'),
#         (2, '已批准'),
#     )
#     name = models.CharField(max_length=32, verbose_name='医生姓名')
#     gender = models.CharField(max_length=32, verbose_name='性别')
#     data_birth = models.DateTimeField(verbose_name='出生日期')
#     department_name = models.CharField(max_length=32, verbose_name='科室名称')
#     department_type = models.CharField(max_length=32, verbose_name='科室类型')
#     job = models.CharField(max_length=32, verbose_name='职务')
#     leave_category = models.CharField(max_length=32, verbose_name='请假类型')
#     leave_reason = models.TextField(verbose_name='请假原因')
#     start_time = models.CharField(max_length=32, verbose_name='请假开始时间', null=True)
#     leave_days = models.IntegerField(verbose_name='请假天数')
#     leave_type = models.SmallIntegerField(choices=type, default=1, verbose_name='假单状态')
#     leave_time = models.DateTimeField(auto_now=True, verbose_name='请假时间')
#     models = models.CharField(max_length=32, verbose_name='联系电话', null=True)
class Leave(models.Model):
    type = (
        (1, '待批准'),
        (2, '已批准'),
    )
    name = models.CharField(max_length=32, verbose_name='性名')
    gender = models.CharField(max_length=32, verbose_name='性别')
    data_birth = models.DateField(verbose_name='出生日期')
    department_name = models.CharField(max_length=32, verbose_name='科室名称')
    department_type = models.CharField(max_length=32, verbose_name='科室类型')
    job = models.CharField(max_length=32, verbose_name='职务')
    leave_category = models.CharField(max_length=32, verbose_name='请假类型')
    leave_reason = models.TextField(verbose_name='请假原因')
    mobile = models.CharField(max_length=32, verbose_name='联系电话', null=True)
    leave_time = models.DateField(auto_now=True, verbose_name='请假时间', blank=True)
    start_time = models.CharField(max_length=32, verbose_name='请假开始时间', null=True,blank=True)
    leave_days = models.IntegerField(verbose_name='请假天数')
    leave_type = models.SmallIntegerField(choices=type, default=1, verbose_name='假单状态')

    # class Meta:
    #     app_label = 'your_app_name'  # 将 'your_app_name' 替换为你的应用程序名称














